package com.caiyouxi.order.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.caiyouxi.common.bean.QueryParams;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.Date;

/**
 * 订单BEAN
 *
 * @author
 * @create 2017-09-27 11:15
 **/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrderBean extends QueryParams implements Serializable {

    private String id;////订单编号。编号规则：1+YYMMddhhmmss+5位随机数字，如117100112324349825
    private String title;//标题
    private Integer pay_id;//支付方式ID
    private String pay_result;//支付结果
    private Integer goods_id;//商品编号
    private Integer goods_version;//版本号
    private Integer goods_category_id;//该商品所属品类编号
    private Integer market_price;//定价
    private Integer price;//售价
    private String unit;//商品的单位
    private Integer num;//购买的件数
    private String currency_code;//货币代码。
    private String account_code;//可以用来支付该订单款项的用户财务专用账户代码。
    private Integer buyer_user_id;//买家编号
    private String buyer_username;//买家用户名
    private Integer seller_user_id;//卖家编号
    private String seller_username;//卖家用户名
    private Integer total_amount;////订单金额，即实际需要支付的金额。 如果是 RMB 货币类型，则单位为分
    private Integer finished_amount;//已经完成的金额，参见 finance_details：资金明细 。
    private String status;//状态UNPAIED：创建后等待用户支付；PAIED：已经确认支付的；COMPLETED：已经确认完成的； CANCLED：用户未支付订单被撤销时，该条财务流水自动被撤销。
    private String properties;//订单属性、参数等信息
    private String remark;////订单备注
    private Date pay_expire_time;//订单支付超时时间。根据创建时间 加上 goods_category：商品品类-OK 中该品类的order_pay_expire_interval得到
    private Date create_time;
    private Date update_time;
    private String phone;                       //手机号码
    private Date start_time;                    //开始时间
    private Date end_time;                      //结束时间
    private String name;                        //所属分类
    private Date create_time_orders;            //订单创建时间
    private String coupon;                      //优惠券

    public String getCoupon() {
        return coupon;
    }

    public void setCoupon(String coupon) {
        this.coupon = coupon;
    }

    public Date getCreate_time_orders() {
        return create_time_orders;
    }

    public void setCreate_time_orders(Date create_time_orders) {
        this.create_time_orders = create_time_orders;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getStart_time() {
        return start_time;
    }

    public void setStart_time(Date start_time) {
        this.start_time = start_time;
    }

    public Date getEnd_time() {
        return end_time;
    }

    public void setEnd_time(Date end_time) {
        this.end_time = end_time;
    }

    public Integer getPages() {
        return pages;
    }

    public void setPages(Integer pages) {
        this.pages = pages;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getPagesize() {
        return pagesize;
    }

    public void setPagesize(Integer pagesize) {
        this.pagesize = pagesize;
    }

    private Integer pages;              //当前页码
    private Integer pagesize;           //每页显示条数

    private Integer app_id; //应用编号
    private String data;//json  "role_id":"1","role_name":"2","server_id":"3","server_name":"4"
    private String product_line_type;//产品类型
    private String fund_json;//{"GOODS":"","":""}      ——{“类型”：“金额”}
    
    private String coupons_ids;//{"GOODS":"","":""}用户勾选的券ids信息，逗号隔开

    private String app_order_id;//聚合订单id
    
    private String up_curreny_code;//上一级货币单位

    public String getUp_curreny_code() {
        return up_curreny_code;
    }

    public void setUp_curreny_code(String up_curreny_code) {
        this.up_curreny_code = up_curreny_code;
    }

    public String getApp_order_id() {
        return app_order_id;
    }

    public void setApp_order_id(String app_order_id) {
        this.app_order_id = app_order_id;
    }

    /**
     * //使用的支付方式
     GATEWAY：第三方支付，关联到 payment_gateway：系统支付方式-OK 表
     COUPON：红包、券，关联到 coupons：券详情-OK
     ACCOUNT：账户支付
     */
    private String payment_type;

    public String getPayment_type() {
        return payment_type;
    }

    public void setPayment_type(String payment_type) {
        this.payment_type = payment_type;
    }

    public String getCoupons_ids() {
        return coupons_ids;
    }

    public void setCoupons_ids(String coupons_ids) {
        this.coupons_ids = coupons_ids;
    }

    public String getFund_json() {
        return fund_json;
    }

    public void setFund_json(String fund_json) {
        this.fund_json = fund_json;
    }

    public Integer getApp_id() {
        return app_id;
    }

    public void setApp_id(Integer app_id) {
        this.app_id = app_id;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    private HttpServletRequest request;

    public HttpServletRequest getRequest() {
        return request;
    }

    public void setRequest(HttpServletRequest request) {
        this.request = request;
    }

    public String getPay_result() {
        return pay_result;
    }

    public void setPay_result(String pay_result) {
        this.pay_result = pay_result;
    }

    public Integer getPay_id() {
        return pay_id;
    }

    public void setPay_id(Integer pay_id) {
        this.pay_id = pay_id;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getGoods_id() {
        return goods_id;
    }

    public void setGoods_id(Integer goods_id) {
        this.goods_id = goods_id;
    }

    public Integer getGoods_version() {
        return goods_version;
    }

    public void setGoods_version(Integer goods_version) {
        this.goods_version = goods_version;
    }

    public Integer getGoods_category_id() {
        return goods_category_id;
    }

    public void setGoods_category_id(Integer goods_category_id) {
        this.goods_category_id = goods_category_id;
    }

    public Integer getMarket_price() {
        return market_price;
    }

    public void setMarket_price(Integer market_price) {
        this.market_price = market_price;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getCurrency_code() {
        return currency_code;
    }

    public void setCurrency_code(String currency_code) {
        this.currency_code = currency_code;
    }

    public String getAccount_code() {
        return account_code;
    }

    public void setAccount_code(String account_code) {
        this.account_code = account_code;
    }

    public Integer getBuyer_user_id() {
        return buyer_user_id;
    }

    public void setBuyer_user_id(Integer buyer_user_id) {
        this.buyer_user_id = buyer_user_id;
    }

    public String getBuyer_username() {
        return buyer_username;
    }

    public void setBuyer_username(String buyer_username) {
        this.buyer_username = buyer_username;
    }

    public Integer getSeller_user_id() {
        return seller_user_id;
    }

    public void setSeller_user_id(Integer seller_user_id) {
        this.seller_user_id = seller_user_id;
    }

    public String getSeller_username() {
        return seller_username;
    }

    public void setSeller_username(String seller_username) {
        this.seller_username = seller_username;
    }

    public Integer getTotal_amount() {
        return total_amount;
    }

    public void setTotal_amount(Integer total_amount) {
        this.total_amount = total_amount;
    }

    public Integer getFinished_amount() {
        return finished_amount;
    }

    public void setFinished_amount(Integer finished_amount) {
        this.finished_amount = finished_amount;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getProperties() {
        return properties;
    }

    public void setProperties(String properties) {
        this.properties = properties;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getPay_expire_time() {
        return pay_expire_time;
    }

    public void setPay_expire_time(Date pay_expire_time) {
        this.pay_expire_time = pay_expire_time;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public Date getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }

    public String getProduct_line_type() {
        return product_line_type;
    }

    public void setProduct_line_type(String product_line_type) {
        this.product_line_type = product_line_type;
    }
}
